var index = getParameter("index");// 节气
var uid = getParameter("uid");// 
var tz=getParameter("tz");// 体质
var sz=[ "小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"  ]; 
//获取url参数
function getParameter(param) {
	var query = window.location.search;
	var iLen = param.length;
	var iStart = query.indexOf(param);
	if (iStart == -1)
		return "";
	iStart += iLen + 1;
	var iEnd = query.indexOf("&", iStart);
	if (iEnd == -1)
		return query.substring(iStart);
	return query.substring(iStart, iEnd);
}



$(function() {
	rt();
});

function rt(){
	
	var urlStr = serverPath + "/app/doctor/doctor/evaOfTraChiMedicine.do";
	var jsonStr = '{method:"getJqys",requestlist:[{index:"'+index+'",tz:"'+tz+'"}],  version:"1.0",uid:"'+uid+'", requestsource:"doctor"}' ;
	UseAjax(urlStr, jsonStr, document.cookie, getJqys, '1');

}


function getJqys(param){
	var model=param.resultlist[0].sdf;//		sport_recommend	"适度出汗"	String
	
	//diet_should	"薏苡仁、黑豆、红豆、绿豆、甘蓝、芹菜、空心菜、鲫鱼、鲤鱼"	String
	//		daily_life	"护腰腹，晨梳头"	String
	
	if(index==0){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==1){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==2){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==3){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==4){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==5){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==6){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==7){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==8){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==9){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==10){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==11){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==12){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==13){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==14){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==15){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	
	if(index==16){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==17){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==18){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==19){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==20){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==21){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==22){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
	if(index==23){
		$(".report-tip p:first").html(model.diet_should).next().html(model.sport_recommend ).next().html(model.daily_life);
		$(".solar-terms p:first").html(sz[index]);
	}
}

function setJqBackground() {
	var images = ['banner_bg_xiaohan', 'banner_bg_dahan', 'banner_bg_lichun', 'banner_bg_yushui', 'banner_bg_jingzhe', 'banner_bg_chunfen', 'banner_bg_qingming', 'banner_bg_guyu', 'banner_bg_lixia', 'banner_bg_xiaoman', 'banner_bg_mangzhong', 'banner_bg_xiazhi', 'banner_bg_xiaoshu', 'banner_bg_dashu', 'banner_bg_liqiu', 'banner_bg_chushu', 'banner_bg_bailu', 'banner_bg_qiufen', 'banner_bg_hanlu', 'banner_bg_shuangjiang', 'banner_bg_lidong', 'banner_bg_xiaoxue', 'banner_bg_daxue', 'banner_bg_dongzhi'];
	$('header').css({'background': 'url(images/' + images[index] + '.jpg)'});
}
